<template>
  <div class="home">
    <div class="homt-box">
      <canvas-tailor :img-width="w" :img-height="h" :img="imgUrl" @getImg="getImg" />
    </div>
    <div style="width: 400px
    ">
      <img :src="imgUrl2" alt style="width: 100%" />
    </div>
  </div>
</template>

<script>
export default {
  name: 'Home',
  components: {},
  data() {
    return {
      w: 280,
      h: 300,
      imgUrl: require('@/assets/image/aaa.jpg'),
      imgUrl2: '',
    };
  },
  created() {
    // imgUrl
  },
  methods: {
    getImg(s) {
      console.log('this.imgUrl2=', this.imgUrl2);
      this.imgUrl2 = s;
    },
  },
};
</script>
<style lang="scss" scoped>
.home {
  box-sizing: border-box;
  padding-top: 20px;
}
.homt-box {
  margin: 0 auto;
  width: 480px;
  height: 500px;
  position: relative;
  border: 1px solid #ffffff;
}
</style>
